package org.lee.fmsb.controller;

import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;

/**
 * HelloController
 *
 * @author dralee
 * @date 2021-12-29 14:06:40
 **/
@Controller
public class HelloController {

    @GetMapping("/")
    public String index(Model model) {
        return "index";
    }

    @GetMapping("/hello")
    public String hello(Model model, @RequestParam(value = "msg", required = false, defaultValue = "Freemarker") String msg) {
        model.addAttribute("message", msg);
        return "hello";
    }
}
